# -*- coding: UTF-8 -*-
# @Time : 2021/10/26 0009 10:14
# @Author : lyw
# @Remark : 设备监测点模板路由
from mxsoftpy import Module

from view.common.AlertCenter.alert_config import *
from view.common.AlertCenter.alert_record import *
from view.common.AlertCenter.public import *
from view.common.AlertCenter.send_record import *

alert_center = Module(name="alert_center", url_prefix="/dev_monitor")

# 告警记录
alert_center.add_resource(AlertRecordSelectView, "/alert_center/record/alert_select.sy")
alert_center.add_resource(AlertRecordStateView, "/alert_center/record/alert_state.sy")
alert_center.add_resource(AlertHistorySelectView, "/alert_center/record/history_select.sy")
alert_center.add_resource(AlertHistoryRetrieveView, "/alert_center/record/alert_retrieve.sy")
alert_center.add_resource(AlertHistoryCountView, "/alert_center/record/alert_count.sy")
alert_center.add_resource(AlertTrendView, "/alert_center/record/alert_trend.sy")

# 发送告警
alert_center.add_resource(SendRecordSelectView, "/alert_center/send_record/record_select.sy")
alert_center.add_resource(SendRecordRetrieveView, "/alert_center/send_record/record_retrieve.sy")
alert_center.add_resource(SendSelectView, "/alert_center/send_record/send_select.sy")

# 告警设置
alert_center.add_resource(AlertStrategySelectView, "/alert_center/alert_config/strategy_select.sy")
alert_center.add_resource(AlertStrategyAddView, "/alert_center/alert_config/strategy_add.sy")
alert_center.add_resource(AlertStrategyStateView, "/alert_center/alert_config/strategy_state.sy")
alert_center.add_resource(AlertStrategyDeleteView, "/alert_center/alert_config/strategy_delete.sy")
alert_center.add_resource(AlertStrategyUpdateView, "/alert_center/alert_config/strategy_update.sy")
alert_center.add_resource(AlertStrategyRetrieveView, "/alert_center/alert_config/strategy_retrieve.sy")
alert_center.add_resource(AlertStrategyTestView, "/alert_center/alert_config/strategy_test.sy")
# 邮件设置
alert_center.add_resource(EmailAddView, "/alert_center/alert_config/email_add.sy")
alert_center.add_resource(EmailListView, "/alert_center/alert_config/email_list.sy")
alert_center.add_resource(EmailDeleteView, "/alert_center/alert_config/email_delete.sy")
alert_center.add_resource(EmailTestView, "/alert_center/alert_config/email_test.sy")
# 短信设置
alert_center.add_resource(SMSAddView, "/alert_center/alert_config/sms_add.sy")
alert_center.add_resource(SMSListView, "/alert_center/alert_config/sms_list.sy")
alert_center.add_resource(SMSDeleteView, "/alert_center/alert_config/sms_delete.sy")
alert_center.add_resource(SMSTestView, "/alert_center/alert_config/sms_test.sy")
# 模板设置
alert_center.add_resource(TempAddView, "/alert_center/alert_config/temp_add.sy")
alert_center.add_resource(TempListView, "/alert_center/alert_config/temp_list.sy")
alert_center.add_resource(TempDeleteView, "/alert_center/alert_config/temp_delete.sy")
# 公共接口
alert_center.add_resource(DeviceTypeListView, "/alert_center/public/type_list.sy")
alert_center.add_resource(ExportView, "/alert_center/public/alert_export.sy")
alert_center.add_resource(HeaderListView, "/alert_center/public/header_list.sy")
alert_center.add_resource(HeaderUpdateView, "/alert_center/public/header_update.sy")
alert_center.add_resource(DeviceMonitorView, "/alert_center/public/device_monitor.sy")
